<?
	include("common.php");
	
	if($loggedin && $fid){
		ob_start();
		header("Location: forum.php?forum=$fid");
	}

	include("header.php");
?>
<p><font face=arial size=3>

<table border="0" cellpadding="10" cellspacing="0" width="85%" align="center">
<tr>
	<td align="left">
		<table border="0" cellpadding="10" cellspacing="1" width="100%">
<?
	// SELECT TABLE
	$qr1 = mysql_query("SELECT * FROM forum ORDER BY name");
	$i = "1";
	$count = 0;
	while( $row = mysql_fetch_object($qr1) ){
		$bgcolor = ($count++ % 2) ? "#F5F5F5" : "#FAFAFA";
		$print_color = $bgcolor;
?>
		<tr>
			<td width="100%">
				<table border="0" cellpadding="10" cellspacing="0" width="100%">
				<tr bgcolor="<?=$print_color?>">
					<td><font face="verdana, arial, helvetica, sans-serif" size="2">
						<a href="forum.php?forum=<?=$row->id?>"><?=$row->name?></a><br />
						<?=$row->description?>
					</td>
					<td align="right" NOWRAP><font face="verdana, arial, helvetica, sans-serif" size="1"><b><?=getPosts($row->id)?></b> Posts</font></td>
				</tr>
				</table>
			</td>
		</tr>
<?
		$i++;
	}
?>
		</table></div>
	</td>
</tr>
</table>
</font></p>
<?
	include("footer.php");
?>